package com.ops.uitl.tapestry;

import org.apache.tapestry.event.PageDetachListener;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import org.apache.log4j.Logger;

public abstract class BasePage extends AbstractPage implements PageDetachListener,PageRenderListener {
	
	protected Logger log = Logger.getLogger(BasePage.class);
	protected BaseData pd;
	
	/**
	 * get base data
	 * @return BaseData
	 */
	public BaseData getBaseData() {
		return pd;
	}
	
	/**
	 * page begin render
	 * @param event
	 */
	public void pageBeginRender(PageEvent event){
		if (log.isDebugEnabled()) log.debug(getPageName() + " render...");
	}
	
	/**
	 * page detached
	 * @param event
	 */
	public void pageDetached(PageEvent event) {
		if (log.isDebugEnabled()) log.debug(getPageName() + " detach...");
	}
	
	/**
	 * page before render
	 */
	public void pageBeforeRender(){
		if (log.isDebugEnabled()) log.debug(getPageName() + " pageBeforeRender...");
	}
}